from 慕课网_Python3高级核心技术97讲_高级进阶的必学课程.chapter04.class_method import Date

class User:
    def __init__(self, birthday):
        self.__birthday = birthday

    def get_age(self):
        # 返回年龄
        return 2024 - self.__birthday.year

if __name__ == '__main__':
    user = User(Date(2023,2,1))
    print(user._User__birthday)
    print(user.get_age())
    # print(user.__birthday)
